{include file="admin/inc/header.tpl"}
{debug}
<div id="content">

<table id="mytable" cellspacing="0" summary="List of registed users">
<caption>List of rooms</caption>
  <tr>
    <th scope="col">
    <a href = "/admin/chat/rooms/room_name/1/">^</a>
			Room name
	<a href = "/admin/chat/rooms/room_name/0/">^</div></a>
	</th>
    <th scope="col">
	<a href = "/admin/chat/rooms/online/1/">^</a>
		Online users
	<a href = "/admin/chat/rooms/online/0/">^</a>
	</th>
	 <th scope="col">
	<a href = "/admin/chat/rooms/room_status/1/">^</a>
		Status
	<a href = "/admin/chat/rooms/room_status/0/">^</a>
	</th>
  </tr>
  {foreach from=$rooms name=foo item=i}
  <tr>
    <th {if !$smarty.foreach.foo.index%2}class="specalt"{else} class="spec"{/if}>
    		{$i.room_name}{if $i.online<10}<b><div id = "offline">(low activity)</div></b>{/if}
    	<a href="/admin/chat/delete/{$i.room_id}/" 
		onclick="return confirm('Delete room \'{$i.room_name}\'\. \nAre you sure?');">
    		<img src="/media/admin/img/bg-action-delete.gif">
		</a>		
	</th>
    <td {if $smarty.foreach.foo.index%2==0} class="alt"{/if}>{$i.online}</td>
	<td {if $smarty.foreach.foo.index%2==0} class="alt"{/if}>{$i.room_status}</td>
	</tr>
  {foreachelse}
  No rooms
  {/foreach}
</table>

<div class="side-col last">

<div class="action add" id="add_flow">
			<a href="/admin/chat/add/">add room</a>
</div>
</div>


<!-- content-->
</div>
{include file="inc/pager.tpl"}
</body>
</html>